<?php

namespace app\common\service\user;

use app\common\model\driving\Agreement;
use think\Db;
use think\Exception;

/**
 * 用户服务类
 **/
class UserService
{

    /**
     * 服务协议列表
     *
     * @return array
     */
    public static function agreement_list()
    {
        $list = Agreement::field('content', true)->select();
        $data = $list;
        $total = count($list);
        return compact('total', 'data');
    }

    /**
     * 服务协议
     *
     * @param integer $id
     * @return mixed
     */
    public static function agreement($id)
    {
        return Agreement::find($id);
    }

}
